﻿Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        DrawP()
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        StarTracker1.Test(PictureBox1.Image)
    End Sub
    Private Sub DrawP()
        Dim Bmp As New Bitmap(1000, 1000, Imaging.PixelFormat.Format24bppRgb)
        Dim G As Graphics = Graphics.FromImage(Bmp)
        G.Clear(Color.Black)
        Dim P As Bitmap = Bitmap.FromFile("c:/planet.jpg")
        G.DrawImage(P, TrackBar1.Value, 350, 300, 300)
        PictureBox1.Image = Bmp
    End Sub

    Private Sub TrackBar1_Scroll(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TrackBar1.Scroll
        DrawP()
    End Sub
End Class
